package com.example.springbootsfzy.service.liujinping;

import com.example.springbootsfzy.domain.CoursePayments;
import com.example.springbootsfzy.mapper.CoursePaymentsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CoursePaymentsService {
    @Autowired
    private CoursePaymentsMapper coursePaymentsMapper;
    public int addCoursePayments(CoursePayments coursePayments) {
        return coursePaymentsMapper.insert(coursePayments);
    }
    public int deleteCoursePayments(Long id) {
        return coursePaymentsMapper.deleteByPrimaryKey(id);
    }
    public int updateCoursePayments(CoursePayments coursePayments) {
        return coursePaymentsMapper.updateByPrimaryKey(coursePayments);
    }
    public int updateCoursePaymentsActive(CoursePayments coursePayments) {
        return coursePaymentsMapper.updateByPrimaryKeySelective(coursePayments);
    }
    public CoursePayments getCoursePayments(Long id) {
        return coursePaymentsMapper.selectByPrimaryKey(id);
    }
    public List<CoursePayments> getAllCoursePayments() {
        return coursePaymentsMapper.getAllCoursePayments();
    }
}
